/************************************************************
 * Project Name         [Thinking_In_Java]
 * File Name            [Example_05_Assertions.java]
 * Creation Date        [25-Jun-2014]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ************************************************************/
package pkg_03_miscellaneous;

/**
 * 断言
 * 
 * @author 不落的太阳(Sean Yang)
 * @version 1.0
 * @since JDK 6
 * 
 */
public class Example_05_Assertions {

	/**
	 * 测试方法
	 * 
	 * 需要在Run Configuration-Arguments-VM arguments启用 -ea
	 * 
	 * @param args
	 *            命令行参数
	 */
	public static void main(String[] args) {
		double d1 = 10;
		assert d1 > 0;

		double d2 = -10;
		assert d2 > 0 : "d2 is negative number";
	}

}
